import request from '@/utils/request'

// 查询楼宇信息列表
export function listBuilding(query) {
  return request({
    url: '/hospital/building/list',
    method: 'get',
    params: query
  })
}

// 查询所有楼宇信息 不分页
export function listAllBuild() {
  return request({
    url: '/hospital/building/listAll',
    method: 'get'
  })
}

// 查询楼宇信息详细
export function getBuilding(buildId) {
  return request({
    url: '/hospital/building/' + buildId,
    method: 'get'
  })
}

// 新增楼宇信息
export function addBuilding(data) {
  return request({
    url: '/hospital/building',
    method: 'post',
    data: data
  })
}

// 修改楼宇信息
export function updateBuilding(data) {
  return request({
    url: '/hospital/building',
    method: 'put',
    data: data
  })
}

// 删除楼宇信息
export function delBuilding(buildId) {
  return request({
    url: '/hospital/building/' + buildId,
    method: 'delete'
  })
}
